﻿<UserControl x:Class="LaunchAllaround.Engine.KinectStatusView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="60" d:DesignWidth="80">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40" />
            <ColumnDefinition Width="40" />
        </Grid.ColumnDefinitions>
        <Image Source="/Resources/Images/Themes/Dark/Header/kinect.png" HorizontalAlignment="Center" Opacity="1" Grid.Column="0" VerticalAlignment="Center" Height="40" />
        <Image Name="failureImg" Source="/Resources/Images/Themes/Dark/Tools/failure.png" HorizontalAlignment="Center" Opacity="1" Grid.Column="1" VerticalAlignment="Center" Height="40" Visibility="Hidden">
            <Image.ToolTip>
                <ToolTip Content="Kinect Disconnected"/>
            </Image.ToolTip>
        </Image>
        <Image Name="successImg" Source="/Resources/Images/Themes/Dark/Tools/success.png" HorizontalAlignment="Center" Opacity="1" Grid.Column="1" VerticalAlignment="Center" Height="40" Visibility="Hidden">
            <Image.ToolTip>
                <ToolTip Content="Kinect Connected"/>
            </Image.ToolTip>
        </Image>
        <Image Name="syncImg" Source="/Resources/Images/Themes/Dark/Tools/sync.png" HorizontalAlignment="Center" Opacity="1" Grid.Column="1" VerticalAlignment="Center" Height="40" Visibility="Hidden">
            <Image.ToolTip>
                <ToolTip Content="Looking for a Kinect"/>
            </Image.ToolTip>
            <Image.RenderTransform>
                <RotateTransform CenterX="20" CenterY="20" />
            </Image.RenderTransform>
            <Image.Style>
                <Style>
                    <Style.Triggers>
                        <Trigger Property="Image.IsEnabled" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation
                                    Storyboard.TargetProperty="RenderTransform.Angle"
                                    From="0"
                                    To="360"
                                    Duration="0:0:1"
                                    RepeatBehavior="Forever" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Image.Style>
        </Image>
    </Grid>
</UserControl>
